package com.xlh.dao.courseTest.helper;

import com.xlh.dao.courseTest.CourseQuestionRepositoryDetailsMapper;
import com.xlh.dao.courseTest.CourseQuestionRepositoryMapper;
import com.xlh.enums.course.ChapterEnum;
import com.xlh.pojo.courseTest.CourseQuestionRepositoryDetails;
import com.xlh.pojo.courseTest.CourseQuestionRepositoryDetailsExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author cfz
 */
@Repository
public class CourseQuestionRepositoryDetailsMapperHelper {


    @Autowired
    private CourseQuestionRepositoryDetailsMapper courseQuestionRepositoryDetailsMapper;

    public List<CourseQuestionRepositoryDetails> findQestionDetails(List<Long> questionIds){

        CourseQuestionRepositoryDetailsExample example2 = new CourseQuestionRepositoryDetailsExample();
        example2.createCriteria().andQuestionIdIn(questionIds);
        example2.setOrderByClause("question_id, order_number");
        List<CourseQuestionRepositoryDetails> courseQuestionRepositoryDetails = courseQuestionRepositoryDetailsMapper.selectByExample(example2);
        return courseQuestionRepositoryDetails;
    }




}
